﻿using WeDonekRpc.Helper;

namespace Basic.UserFormService.Calculate.Extend
{
    public static class StringExtend
    {
        public static int Len ( string str )
        {
            if ( str == null )
            {
                return 0;
            }
            return str.Length;
        }
        public static int Len ( string[] str )
        {
            if ( str == null )
            {
                return 0;
            }
            return str.Length;
        }
        public static string Trim ( string str )
        {
            return str.Trim();
        }
        public static bool IsNull ( string str )
        {
            return str.IsNull();
        }
        public static string Substring ( string str, int index )
        {
            return str.Substring(index);
        }
        public static string Substring ( string str, int index, int len )
        {
            return str.Substring(index, len);
        }
        public static string[] Split ( string str, char separator )
        {
            return str.Split(separator);
        }
        public static string Join ( string[] str, char separator )
        {
            return string.Join(separator, str);
        }
    }
}
